package org.dingfugui.triple.connection;

import java.io.IOException;
import java.io.Writer;

/**
 * 连接父接口，表示一个网络连接
 * Created by fugui.ding on 2015/3/23.
 */
public interface Connection extends AutoCloseable {


    Reader read(Reader reader);

    Writer write(Writer writer);

    /**
     * 关闭该连接
     *
     * @throws IOException
     */
    void close() throws IOException;

    /**
     * 该连接是否关闭状态
     *
     * @return
     */
    boolean isClose();

}
